package lgs

import (
	"os"
	"time"
)

//创建文件夹
func (this *Lgs) create() {
	if !this.cPath {
		err := os.MkdirAll(this.path, 0766)
		if err != nil {
			Test("创建文件错误:", err)
		} else {
			this.cPath = true
		}
	}
}

//生成文件名
func (this *Lgs) fileName(s string) string {
	return this.path + "/" + s + "-" + time.Now().Format("20060102") + ".log"
}
